// 数据类型定义

export interface ResponseData{
    code:number,
    message:string,
    ok:boolean
}

// 菜单与按钮的ts类型
export interface Permission{
    id?:number,
    createTime:string,
    updateTime:string,
    pid:number,
    name:string,
    code:string,
    toCode:string,
    type:number,
    status:null,
    level:number,
    children?:PermissionList,
    select:boolean
}

export type PermissionList=Permission[]

// 菜单接口数据返回ts类型
export interface PermissionResponseData extends ResponseData{
    data:PermissionList
}

// 添加与修改菜单携带的参数ts类型
export interface MenuParams{
    id?:number,// Id
    code:string, // 权限值
    level:number, // 几级菜单
    name:string, // 菜单名字
    pid:number //父菜单的Id
}